home *** CD-ROM | disk | FTP | other *** search
- Option Explicit
- Dim mbResult%
- Dim mFuncSelected$
-
- 'routine called by frmSelect to show the next form
- 'after unloading itself
- Sub GoNextForm (flgNextStep%)
- Dim DynArray$()
- Dim Temp$
- Dim i%, dummy%, NumElements%
-
-
- 'assign the appropriate routine text to the appropriate
- 'label, removing the ampersands from the text
- If flgNextStep% = FLG_PROCPARSE Then
- 'process the caption to remove the ampersand - another use for the
- 'ParseAndfillarray and ProcessArray Functions
- NumElements% = ParseAndFillArray1%(mFuncSelected$, "&", DynArray$())
- 'ProcessArray$ will build a new string without new char(s) inserted
- 'if empty string is passed as the 2nd parameter
- frmParse!lblCurFunc = ProcessArray$(DynArray$(), "", dummy%)
- Screen.MousePointer = DEFAULT
- frmParse.Show
- frmParse.WindowState = NORMAL
- Else 'flgNextStep% = FLG_MULTIDELIM
- NumElements% = ParseAndFillArray1%(mFuncSelected$, "&", DynArray$())
- frmMultiDelim!lblCurFunc = ProcessArray$(DynArray$(), "", dummy%)
- Screen.MousePointer = DEFAULT
- frmMultiDelim.Show
- frmMultiDelim.WindowState = NORMAL
- End If
-
- End Sub
-
- '9/25/94
- 'load form select, set its tag and controls, then display
- Sub SetfrmSelect (CurRoutine$, flgNextStep%)
- Dim FuncSelected$
-
- Load frmSelect
-
- 'initialize module-scope vars
- mbResult% = False
- mFuncSelected$ = ""
-
- 'store next step flag in form tag
- frmSelect.Tag = CStr(flgNextStep%)
-
- 'set the value option based on CurRoutine$
- If CurRoutine$ = "ParseAndFillArray1%()" Or CurRoutine$ = "" Then
- frmSelect!optParse(0).Value = True
- ElseIf CurRoutine$ = "ParseAndFillArray2%()" Then
- frmSelect!optParse(1).Value = True
- Else
- frmSelect!optParse(2).Value = True
- End If
-
- Screen.MousePointer = DEFAULT
- frmSelect.Show MODAL
-
- If mbResult% = True Then
- Screen.MousePointer = HOURGLASS
- 'set up next form to display based on info we now have
- GoNextForm flgNextStep%
- End If
-
- End Sub
-
- 'get the text of the option selected (the function
- 'name) and assign it to module-scope var.
- Sub SetFuncSelected (F As frmSelect, bResult%)
- Dim i%
-
- If bResult% = True Then
- 'i represents index of optionbutton control array
- 'on frmSelect
- For i = 0 To 2
- If F!optParse(i).Value = True Then
- mFuncSelected$ = F!optParse(i).Caption
- Exit Sub
- End If
- Next i
- Else
- 'modal dialog cancelled by user
- mFuncSelected$ = ""
- End If
- End Sub
-
- Sub SetSelectResult (bResult%)
- 'based on whether user accepted a function
- 'from the modal form or cancelled, set module
- 'scope var. to true or false
- If bResult% = True Then
- mbResult% = True
- Else
- mbResult% = False
- End If
-
- End Sub
-
-